package com.tencent.sr.iris.activity.interfaces.client.tool;

import com.tencent.sr.iris.activity.interfaces.request.acticity.QueryEventHandingRecordPageRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.QueryUserTaskRecordPageRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.UpdateUserTaskRecordRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.UserAwardRetryRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.TaskRecordRetryRequest;
import com.tencent.sr.iris.activity.interfaces.request.task.EventRetryRequest;
import com.tencent.sr.iris.activity.interfaces.request.task.MockCommissionRequest;
import com.tencent.sr.iris.activity.interfaces.request.task.MockEventRequest;
import com.tencent.sr.iris.activity.interfaces.request.task.MockTraineeTimeRequest;
import com.tencent.sr.iris.activity.interfaces.request.task.UserBaseRequest;
import com.tencent.sr.iris.activity.interfaces.response.activity.EventHandingRecordResponse;
import com.tencent.sr.iris.activity.interfaces.response.activity.UserAwardRetryResponse;
import com.tencent.sr.iris.activity.interfaces.response.activity.UserTaskRecordResponse;
import com.tencent.sr.rmall.common.primitive.HttpResult;
import com.tencent.sr.rmall.common.request.PaginationRequest;
import com.tencent.sr.rmall.common.response.PaginationResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "iris-activity-core-service", contextId = "IrisActivityToolClient",
        path = "/api/v1/iris/iris-activity-core-service/activity/tool")
public interface IrisActivityToolClient {

    @PostMapping("mockTraineeTime")
    HttpResult<String> mockTraineeTime(@RequestBody @Validated MockTraineeTimeRequest request);

    @PostMapping("mockCommission")
    HttpResult<String> mockCommission(@RequestBody @Validated MockCommissionRequest request);

    @PostMapping("mockEvent")
    HttpResult<String> mockEvent(@RequestBody @Validated MockEventRequest request);

    @PostMapping("queryTraineeTime")
    HttpResult<Long> queryTraineeTime(@RequestBody @Validated UserBaseRequest request);

    @PostMapping("queryUserTaskRecordPage")
    HttpResult<PaginationResponse<UserTaskRecordResponse>> queryUserTaskRecordPage(
            @RequestBody @Validated PaginationRequest<QueryUserTaskRecordPageRequest> request);

    @PostMapping("updateUserTaskRecord")
    HttpResult<Boolean> updateUserTaskRecord(@RequestBody @Validated UpdateUserTaskRecordRequest request);

    @PostMapping("userAwardRetry")
    @ApiOperation(value = "userAwardRetry", httpMethod = "POST")
    HttpResult<UserAwardRetryResponse> userAwardRetry(
            @Validated @RequestBody UserAwardRetryRequest request);

    @PostMapping("eventRetry")
    @ApiOperation(value = "eventRetry", httpMethod = "POST")
    HttpResult<Boolean> eventRetry(@Validated @RequestBody EventRetryRequest request);

    @PostMapping("taskRecordRetry")
    @ApiOperation(value = "taskRecordRetry", httpMethod = "POST")
    HttpResult<Boolean> taskRecordRetry(@Validated @RequestBody TaskRecordRetryRequest request);

    @PostMapping("queryEventHandingInfoPage")
    HttpResult<PaginationResponse<EventHandingRecordResponse>> queryEventHandingInfoPage(
            @RequestBody @Validated PaginationRequest<QueryEventHandingRecordPageRequest> request);
}
